-- card: 43277 from stack: in.11 -- bmap block id: 43664 -- flags: 4000 -- background id: 42812 -- name: game ----- HyperTalk script ----- On OpenCard put the userLevel into saveLevel if the userLevel < 3 then set userLevel to 3 --"Painting" else end if if the userLevel < 3 then exit OpenCard put 5 into x choose rect tool set pattern to 1 set filled to true drag from 1,111 to 246,342 choose select tool drag from 80,50 to 200,110 with commandKey put " " into field "policy" put 1990 into field "yr" put 5.2 into field "pop" put 1.17 into field "pp" put 350 into field "co2" put 1.7 into field "meth" put 307 into field "n2o" put 0 into field "tc" put 0 into field "tf" put " " into field "box1" put " " into field "box2" answer "Select CO2 emission policy" with "Increase" or "Decrease" or "Cancel" if it contains "Cancel" then reset paint choose browse tool pop card else put 1.0 into policy if it contains "Increase" then answer "Select 10 yr CO2 emission target %:" with "+20" or "+10" or "No change" if it contains "+20" then put 1.02 into policy else end if if it contains "+10" then put 1.01 into policy else end if else if it contains "Decrease" then answer "Select 10 yr CO2 emssion target %:" with "-50" or "-20" or "No change" if it contains "-50" then put .95 into policy else end if if it contains "-20" then put .98 into policy else end if end if end if put " Initializing w/ historical CO2 data" into field "policy" set cursor to watch put 0 into mmod put 5.112 into pop put 6.0 into carb put 3.0 into cnet put 1.7 into meth put 307.0 into n20 put 0 into brkflg put random(4) + 1.5 into sens put random(56) + 19 into tau put sens into q divide q by 300.0 put q into k1 put tau -1 into q divide q by tau put q into k2 repeat with yr = 1890 to 2050 if yr < 1990 then if yr mod 5 = 0 then put yr into field "box1" doMenu Flip Vertical end if if yr < 1960 then put 40 into q divide q by 70 put 295 + q * (yr - 1890) into ppm else put 70 into q divide q by 30 put 335 + q * (yr - 1960) into ppm end if else set cursor to hand put " " into field "box1" put pop * 1.014 into pop set the numberFormat to ".00" put " Annual CO2 multiplier =" && policy into field "policy" put policy * carb into carb put policy * cnet into cnet put cnet into q divide q by 700 put q + 1 into rate put rate * ppm into ppm put ppm - 295.0 into q divide q by 2.0 put q + 295.0 into co2 put co2 into q divide q by 350.0 put (1.0 + 2 * (q - 1.0)) * 1.7 into meth put 0.877 * co2 into n2o end if put (ppm - 295.0) * k1 into temp1 put mmod * k2 into temp2 put temp1 + temp2 into mmod put mmod * (1.0 - k2) into tc if yr = 1990 then put tc into ref choose rect tool set lineSize to 3 set pattern to 13 set filled to true end if if yr > 1990 then if yr mod 5 = 0 then set the numberformat to "." put yr into field "yr" set the numberFormat to ".0" put pop into field "pop" put carb / pop into field "pp" put co2 into field "co2" put meth into field "meth" put n2o into field "n2o" put tc - ref into field "tc" put (tc - ref) * 1.8 into field "tf" put x + 12 into x2 put round(338 - (50 * (tc - ref))) into y drag from x,338 to x2,y put x + 20 into x else end if else end if end repeat put "Model Sensitivity =" && sens into field "box1" put "Ocean Delay =" && tau into field "box2" reset paint choose browse tool set lineSize to 1 end if set userLevel to saveLevel End OpenCard -- part 2 (button) -- low flags: 00 -- high flags: A003 -- rect: left=362 top=30 right=48 bottom=407 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Print ----- HyperTalk script ----- on mouseUp doMenu "Print Card" end mouseUp -- part contents for background part 4 ----- text ----- 2050 -- part contents for background part 13 ----- text ----- Annual CO2 multiplier = .95 -- part contents for background part 6 ----- text ----- 365.1 -- part contents for background part 3 ----- text ----- 11.9 -- part contents for background part 5 ----- text ----- .0 -- part contents for background part 7 ----- text ----- 1.8 -- part contents for background part 8 ----- text ----- 320.2 -- part contents for background part 10 ----- text ----- 1.1 -- part contents for background part 9 ----- text ----- 2.0 -- part contents for background part 11 ----- text ----- Model Sensitivity = 5.5 -- part contents for background part 12 ----- text ----- Ocean Delay = 52.0